#include "stdafx.h"
#include "MainFrm.h"
#include "TNavigateView.h"
#include "UIPattern.h"
#include "navicombobar.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

BEGIN_MESSAGE_MAP(TEntTypeComboBar, TNaviTBarBase)
END_MESSAGE_MAP()

BOOL TEntTypeComboBar::CreateComboBox(UINT nIndex, UINT nID)
{
	CRect rect;
	rect.top = rect.left = 0;
	rect.bottom = 5*22;
	rect.right = GetCount() * GetButtonSize().cx;
	if (!m_layerCombo.Create(L"COMBOBOX", NULL, CBS_DROPDOWN|WS_VISIBLE|WS_TABSTOP|WS_VSCROLL, rect, this, nID))
	{
		TRACE("Failed to create combo-box\n");
		return FALSE;
	}
	m_layerCombo.SetItemHeight(-1, 16);
	return TRUE;
}

BEGIN_MESSAGE_MAP(TEntFlorComboBar, TNaviTBarBase)
END_MESSAGE_MAP()

BOOL TEntFlorComboBar::CreateComboBox(UINT nIndex, UINT nID)
{
	CRect rect;
	rect.top = rect.left = 0;
	rect.bottom = 5*22;
	rect.right = GetCount() * GetButtonSize().cx;
	if (!m_layerCombo.Create(L"COMBOBOX", NULL, CBS_DROPDOWN|WS_VISIBLE|WS_TABSTOP|WS_VSCROLL, rect, this, nID))
	{
		TRACE("Failed to create combo-box\n");
		return FALSE;
	}
	m_layerCombo.SetItemHeight(-1, 16);
	return TRUE;
}